import 'dart:convert';

import 'package:flutter_nb_net/flutter_net.dart';

class AppUpgradeResp extends BaseNetModel {
  int? code;
  String? msg;
  AppUpgradeData? data;

  AppUpgradeResp({this.code, this.msg, this.data});

  @override
  fromJson(Map<String, dynamic> json) {
    return AppUpgradeResp(
      code: json['code'],
      msg: json['msg'],
      data: json['data'] == null ? null : AppUpgradeData().fromJson(json['data']),
    );
  }

  fromJsonStr(String jsonStr) {
    return AppUpgradeResp().fromJson(json.decode(jsonStr));
  }
}

class AppUpgradeData extends BaseNetModel {
  bool? updated;
  String? platform;
  String? appName;
  String? appVersion;
  int? versionNum;
  String? downloadUrl;
  String? upgradeTitle;
  String? upgradeInfo;
  String? forceUpdate;
  int? apkSize;

  AppUpgradeData({this.updated, this.platform, this.appName, this.appVersion, this.versionNum, this.downloadUrl, this.upgradeTitle, this.upgradeInfo, this.forceUpdate, this.apkSize});

  @override
  fromJson(Map<String, dynamic> json) {
    return AppUpgradeData(
      updated: json['updated'],
      platform: json['platform'],
      appName: json['appName'],
      appVersion: json['appVersion'],
      versionNum: json['versionNum'],
      downloadUrl: json['downloadUrl'],
      upgradeTitle: json['upgradeTitle'],
      upgradeInfo: json['upgradeInfo'],
      forceUpdate: json['forceUpdate'],
      apkSize: json['apkSize'],
    );
  }

  fromJsonStr(String jsonStr) {
    return AppUpgradeData().fromJson(json.decode(jsonStr));
  }


}